package org.linlinjava.litemall.admin.web.order_manage;

import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.linlinjava.litemall.admin.service.order_manage.AgedmallShopService;
import org.linlinjava.litemall.admin.vo.hospital_channel.HospitalChannelLinkListVo;
import org.linlinjava.litemall.admin.vo.hospital_channel.ModifyHospitalChannelLinkVo;
import org.linlinjava.litemall.admin.vo.hospital_send.ModifyHospitalVo;
import org.linlinjava.litemall.admin.vo.shop.*;
import org.linlinjava.litemall.core.util.FileUtils;
import org.linlinjava.litemall.db.domain.LitemallAdmin;
import org.linlinjava.litemall.db.vo.order_manage.PromoterStaticDetailIVo;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.IOException;
import java.util.Date;
import java.util.List;

/**
 * @author wj
 * @date 2021/8/6 9:23
 */
@RestController
@RequestMapping("/shop")
public class AgedmallShopController {


    @Resource
    private AgedmallShopService agedmallShopService;

    /**
     * 添加店铺
     * @return
     */
    @PostMapping("/createShop")
    public Object createShop(@RequestBody CreateShopVo createShopVo){
        Subject currentUser = SecurityUtils.getSubject();
        LitemallAdmin admin = (LitemallAdmin) currentUser.getPrincipal();
         return agedmallShopService.createShop(createShopVo,admin.getId());
    }

    /**
     * 获取店铺列表
     * @return
     */
    @GetMapping("/listShop")
    public Object listShop(){
        Subject currentUser = SecurityUtils.getSubject();
        LitemallAdmin admin = (LitemallAdmin) currentUser.getPrincipal();
        return agedmallShopService.listShop(admin.getUsername());
    }

    /**
     * 删除店铺
     */
    @PostMapping("/delShop")
    public Object delShop(@RequestBody DelShop delShop){
        return agedmallShopService.delShop(delShop);
    }

    /**
     * 撤销审核
     */
    @PostMapping("/revocatShop/{id}/{type}")
    public Object revocatShop(@PathVariable String id,@PathVariable Integer type){
        return agedmallShopService.revocatShop(id,type);
    }


//    --------分类管理-------------


    /**
     *  添加分类
     */
    @PostMapping("/commodityClassification/add")
    public Object commodityClassification(@RequestBody @Validated CommodityClassificationVo commodityClassificationVo){

        return agedmallShopService.commodityClassification(commodityClassificationVo);
    }


    /**
     * 编辑分类
     */
    @PostMapping("/commodityClassification/Edit")
    public Object commodityClassificationEdit(@RequestBody  @Validated CommodityClassificationVo commodityClassificationVo){

        return agedmallShopService.commodityClassificationEdit(commodityClassificationVo);
    }


    /**
     * 编辑分类获取二级分类信息
     */
    @PostMapping("/commodityClassification/getSecond")
    public Object commodityClassificationgetSecond(@RequestBody @Validated @NotBlank(message = "一级分类id不能为空") String id){

        return agedmallShopService.commodityClassificationgetSecond(id);
    }

    /**
     * 获取分类列表
     */
    @GetMapping("/commodityClassification/list")
    public Object commodityClassificationList(@Validated ClassifyListVo classifyListVo){
        return agedmallShopService.commodityClassificationList(classifyListVo);
    }

    /**
     * 分类-删除
     */
    @PostMapping("/commodityClassification/del")
    public Object commodityClassificationDel(@RequestBody @Validated @Size(min = 1,message = "分类id不能为空") List<Integer> id){
        return agedmallShopService.commodityClassificationDel(id);
    }

    /**
     * 获取分类列表-树结构
     */
    @PostMapping("/commodityClassification/treeList")
    public Object commodityClassificationtreeList(){
        return agedmallShopService.commodityClassificationtreeList();
    }



    //    --------推广管理-------------

    /**
     * 获取推广信息(累计订单、累计销售额、累计客户、累计佣金、已结算、待结算)
     */
    @PostMapping("/extensionManagement/info")
    public Object extensionManagementInfo(@RequestBody @Validated @NotBlank(message = "店铺id不能为空") String shopId ){
        return agedmallShopService.extensionManagementInfo(shopId);
    }

    /**
     * 获取推广员列表
     */
    @PostMapping("/extensionManagement/list")
    public Object extensionManagementList(@RequestBody @Validated ExtensionManagementListVo extensionManagementListVo){
        return agedmallShopService.extensionManagementList(extensionManagementListVo);
    }


    /**
     * 根据推广员获取详情
     * @param extensionManagementListVo
     * @return
     */
    @PostMapping("/extensionManagement/PromoterDetail")
    public Object getPromoteInfo(@RequestBody ExtensionManagementListVo extensionManagementListVo){
        Object promoteInfoObj = agedmallShopService.getPromoteInfo(extensionManagementListVo.getPromoterId());
        return promoteInfoObj;
    }

    /**
     * 统计某个推广员的推荐的客户列表
     * @param promoterId
     * @return
     */
    @RequestMapping("/extensionManagement/getCustomerSaleInfo")
    public Object getCustomerSaleInfo(Integer promoterId,Integer page,Integer limit){
        return agedmallShopService.getCustomerSaleInfo(promoterId,page,limit);
    }

    /**
     * 推广管理-获取代理列表
     * @param extensionManagementListVo
     * @return
     */
    @PostMapping("/extensionManagement/proxyList")
    public Object proxyList(@RequestBody @Validated ExtensionManagementListVo extensionManagementListVo){
        return agedmallShopService.proxyList(extensionManagementListVo.getShopId());
    }


    /**
     * 推广管理-获取推广统计详情列表
     * @param promoterStaticDetailIVo
     * @return
     */
    @PostMapping("/extensionManagement/staticDetail")
    public Object staticDetail(@RequestBody PromoterStaticDetailIVo promoterStaticDetailIVo){
        return agedmallShopService.staticDetail(promoterStaticDetailIVo);
    }


    /**
     * 推广管理-导出推广统计EXCEL
     * @param promoterStaticDetailIVo
     * @param request
     * @param response
     */
    @PostMapping(value = "/extensionManagement/exportData")
    public void export(@RequestBody PromoterStaticDetailIVo promoterStaticDetailIVo,HttpServletRequest request, HttpServletResponse response){
        HSSFWorkbook workbook = new HSSFWorkbook();
        //通过获取请求头中浏览器信息
        String agent = request.getHeader("User-Agent");
        //根据浏览器不同将文本进行编码
        String  fileName = "推广统计"+ (new Date()).getTime()  + ".xls";//设置要导出的文件的名字
        try {
            fileName = FileUtils.encodeDownloadFilename(fileName, agent);
        } catch (IOException e) {
            e.printStackTrace();
        }
        agedmallShopService.exportList(workbook,promoterStaticDetailIVo);
        response.setContentType("application/octet-stream");
        response.setHeader("contentType", "application/vnd.ms-excel");
        response.setHeader("Content-disposition", "attachment;filename=" + fileName);
        try {
            response.flushBuffer();
            workbook.write(response.getOutputStream());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }



    /**
     * 获取推广员推荐的下单信息
     * @param promoterId
     * @param page
     * @param limit
     * @return
     */
    @RequestMapping("/extensionManagement/getUserOrderInfo")
    public Object getUserOrderInfo(Integer promoterId,Integer page,Integer limit){
        return agedmallShopService.getUserOrderRecommendInfo(promoterId,page,limit);
    }



    /**
     * 新增推广-根据商品获取门店列表
     */
    @PostMapping("/extensionManagement/getStore")
    public Object extensionManagementGetStore(@RequestBody @Validated ExtensionManagementGetStoreVo emgs){

        return agedmallShopService.extensionManagementGetStore(emgs);
    }

    /**
     * 推广管理-推广员详情列表
     */
    @PostMapping("/extensionManagement/promoterList")
    public Object extensionManagementPromoterList(@RequestBody @Validated PromoterListVo promoterListVo){
        return agedmallShopService.extensionManagementPromoterList(promoterListVo);
    }

    /**
     * 添加推广员
     */
    @PostMapping("/inventoryManagement/add")
    public Object inventoryManagementAdd(@RequestBody @Validated InventoryManagementAddVo inventoryManagementAddVo){
        return agedmallShopService.inventoryManagementAdd(inventoryManagementAddVo);
    }

    /**
     * 编辑推广员
     */
    @PostMapping("/inventoryManagement/Edit")
    public Object inventoryManagementEdit(@RequestBody @Validated InventoryManagementEditVo  inventoryManagementAddVo){
        return agedmallShopService.inventoryManagementEdit(inventoryManagementAddVo);
    }

    /**
     * 删除推广员
     */
    @PostMapping("/extensionManagement/delPromoter")
    public Object extensionManagementDelPromoter(@RequestBody @Validated @NotNull(message = "推广员id不能为空") String promoterId){
        return agedmallShopService.extensionManagementDelPromoter(promoterId);
    }

    /**
     *推广员详情-获取客户列表
     */
    @PostMapping("/extensionManagement/LJKH")
    public Object extensionManagementLJKH(@RequestBody @Validated @NotNull(message = "推广员id不能为空") String promoterId){
        return agedmallShopService.extensionManagementLJKH(promoterId);
    }


    /**
     * 推广员详情-获取提现记录列表
     */
    @PostMapping("/extensionManagement/TXJL")
    public Object extensionManagementTXJL(@RequestBody @Validated @NotNull(message = "推广员id不能为空") String promoterId){
        return agedmallShopService.getWithdrawalMoney(promoterId);
    }


    /**
     * 提现记录
     * @param promoterId
     * @param page
     * @param limit
     * @return
     */
 /*   @RequestMapping("/extensionManagement/getWithdrawalMoney")
    public Object getWithdrawalMoney(Integer promoterId,Integer page,Integer limit){
        return agedmallShopService.getWithdrawalMoney(promoterId,page,limit);
    }*/


    /**
     * 推广方案-获取推广方案列表
     */
    @PostMapping("/scheme/List")
    public Object schemeList(@RequestBody @Validated SchemeListVo schemeListVo){
        return agedmallShopService.schemeList(schemeListVo);
    }

    /**
     *  推广方案-详情
     */
    @PostMapping("/scheme/Detail")
    public Object schemeDetail(@RequestBody @Validated @NotBlank(message = "推广id不能为空") String schemeId){
        return agedmallShopService.schemeDetail(schemeId);
    }


    /**
     * 推广方案-添加方案
     */
    @PostMapping("/scheme/add")
    public Object schemeAdd(@RequestBody @Validated SchemeAddVo schemeAddVo){
        return agedmallShopService.schemeAdd(schemeAddVo);
    }

    /**
     * 推广方案-编辑
     */
    @PostMapping("/scheme/Edit")
    public Object schemeEdit(@RequestBody @Validated SchemeEditVo schemeEditVo) {
        return agedmallShopService.schemeEdit(schemeEditVo);
    }

    /**
     * 推广方案-删除
     */
    @PostMapping("/scheme/del")
    public Object schemeDel(@RequestBody @Validated @NotBlank(message = "推广方案id不能为空") String schemeId){
        return agedmallShopService.schemeDel(schemeId);
    }


    /**
     * 推广管理-获取推广商品列表
     */
    @PostMapping("/extension/list")
    public Object extensionList(@RequestBody @Validated ExtensionListVo extensionListVo){
        return agedmallShopService.extensionList(extensionListVo);
    }

    /**
     * 推广管理-获取未推广商品列表
     */
    @PostMapping("/unExtension/list")
    public Object unExtensionList(@RequestBody @Validated UnextensionListVo unextensionListVo){
        return agedmallShopService.unExtensionList(unextensionListVo);
    }

    /**
     * 推广管理-推广商品-取消推广
     */
    @PostMapping("/extension/cancel")
    public Object extensionCancel(@RequestBody @Validated @Size(min = 1,message = "推广商品id不能为空") List<Integer> commodityId){
        return agedmallShopService.extensionCancel(commodityId);
    }

    /**
     * 添加推广商品-对未设置推广商品进行分成比例设置
     */
    @PostMapping("/promotion/updateProportion")
    public Object promotionUpdateProportion(@RequestBody @Validated @Size(min = 1,message = "设置商品不能为空") @Valid  List<PromotionUpdateProportionVo> pupv){
        return agedmallShopService.promotionUpdateProportion(pupv);
    }


    /**
     * 添加推广商品-对未设置推广商品进行分成比例设置
     */
    @PostMapping("/promotion/update")
    public Object promotionUpdate(@RequestBody @Validated PromotionUpdateVo promotionUpdateVo){
        return agedmallShopService.promotionUpdate(promotionUpdateVo);
    }






//    -----------运费模板管理-------------------


    /**
     * 新增运费模板-快递发货
     */
    @PostMapping("/freightTemplate/add")
    public Object freightTemplateAdd(@RequestBody @Validated AddExpressVo  addExpressVo){
        return agedmallShopService.freightTemplateAdd(addExpressVo);
    }

    /**
     * 新增运费模板-同城配送
     */
    @PostMapping("/freightTemplate/addSameCity")
    public Object freightTemplateAddSameCity(@RequestBody  @Validated AddSameCityVo addSameCityVo){
        return agedmallShopService.freightTemplateAddSameCity(addSameCityVo);
    }

    /**
     * 新增运费模板-快递-编辑
     */
    @PostMapping("/freightTemplate/kEdit")
    public Object freightTemplateKedit(@RequestBody @Validated AddExpressVo  addExpressVo){
        return agedmallShopService.freightTemplateKedit(addExpressVo);
    }


    /**
     * 新增运费模板-同城-编辑
     */
    @PostMapping("/freightTemplate/tEdit")
    public Object freightTemplateTedit(@RequestBody @Validated AddSameCityVo addSameCityVo){
        return agedmallShopService.freightTemplateTedit(addSameCityVo);
    }

    /**
     * 获取运费模板列表
     */
    @PostMapping("/freightTemplate/list")
    public Object freightTemplateList(@RequestBody @Validated FreightTemplateListVo freightTemplateListVo){
        return agedmallShopService.freightTemplateList(freightTemplateListVo);
    }

    /**
     * 删除运费模板
     */
    @PostMapping("/freightTemplate/del")
    public Object freightTemplateDel(@RequestBody @Validated @NotBlank(message = "模板id不能为空") String templateID){
        return agedmallShopService.freightTemplateDel(templateID);
    }


    //    -----------收费模板管理-------------------


    /**
     * 收费模板-添加
     */
    @PostMapping("/collectMoneyTemplate/add")
    public Object collectMoneyTemplateAdd(@RequestBody @Validated CollectMoneyTemplateAddVo collectMoneyTemplateAddVo){
        return agedmallShopService.collectMoneyTemplateAdd(collectMoneyTemplateAddVo);
    }

    /**
     * 收费模板-编辑
     */
    @PostMapping("/collectMoneyTemplate/Edit")
    public Object collectMoneyTemplateEdit(@RequestBody CollectMoneyTemplateAddVo collectMoneyTemplateAddVo){
        return agedmallShopService.collectMoneyTemplateEdit(collectMoneyTemplateAddVo);
    }

    /**
     * 收费模板-获取收费模板列表
     */
    @PostMapping("/collectMoneyTemplate/list")
    public Object collectMoneyTemplateList(@RequestBody @Validated CollectMoneyTemplateListVo collectMoneyTemplateAddVo){
        return agedmallShopService.collectMoneyTemplateList(collectMoneyTemplateAddVo);
    }


    /**
     * 收费模板-删除
     */
    @PostMapping("/collectMoneyTemplate/del")
    public Object collectMoneyTemplateDel(@RequestBody @Validated @Size(min = 1,message = "模板id不能为空") List<Integer> templateId){
        return agedmallShopService.collectMoneyTemplateDel(templateId);
    }


    //    -----------运维费模板管理-------------------

    /**
     * 新增运维费模板
     */
    @PostMapping("/YWFTemplate/add")
    public Object ywfTemplateAdd(@RequestBody @Validated YWFTemplateAddVo ywfTemplateAddVo){
        return agedmallShopService.ywfTemplateAdd(ywfTemplateAddVo);
    }

    /**
     * 运维费模板-编辑
     */
    @PostMapping("/YWFTemplate/Edit")
    public Object ywfTemplateEdit(@RequestBody @Validated YWFTemplateAddVo ywfTemplateAddVo){
        return agedmallShopService.ywfTemplateEdit(ywfTemplateAddVo);
    }

    /**
     * 运维费列表
     */
    @PostMapping("/YWFTemplate/list")
    public Object ywfTemplateList(@RequestBody @Validated YWFTemplateListVo ywfTemplateListVo){
        return agedmallShopService.ywfTemplateList(ywfTemplateListVo);
    }


    /**
     * 运维费模板删除
     */
    @PostMapping("/YWFTemplate/del")
    public Object ywfTemplateDel(@RequestBody @Validated @NotBlank(message = "模板id不能为空") String id){
        return agedmallShopService.ywfTemplateDel(id);
    }


    //    -----------云仓管理-------------------


    /**
     * 云仓管理-添加云仓
     */
    @PostMapping("/gloudWarehouse/add")
    public Object gloudWarehouseAdd(@RequestBody @Validated GloudWarehouseAddVo gloudWarehouseAddVo){
        return agedmallShopService.gloudWarehouseAdd(gloudWarehouseAddVo);
    }

    /**
     * 云仓管理-编辑云仓
     */
    @PostMapping("/gloudWarehouse/EditUpdate")
    public Object gloudWarehouseEditUpdate(@RequestBody @Validated GloudWarehouseAddVo gloudWarehouseAddVo){
        return agedmallShopService.gloudWarehouseEditUpdate(gloudWarehouseAddVo);
    }

    /**
     * 获取云仓列表
     */
    @PostMapping("/gloudWarehouse/list")
    public Object gloudWarehouseList(@RequestBody @Validated GloudWarehouseListVo gloudWarehouseListVo){
        return agedmallShopService.gloudWarehouseList(gloudWarehouseListVo);
    }


    /**
     * 云仓管理-删除
     */
    @PostMapping("/gloudWarehouse/del")
    public Object gloudWarehouseDel(@RequestBody @Validated @Size(min = 1,message = "云仓id不能为空") List<Integer> warehouseId){
        return agedmallShopService.gloudWarehouseDel(warehouseId);
    }


    /**
     * 云仓管理-库存管理-添加商品
     */
    @PostMapping("/gloudWarehouse/addCommodity")
    public Object gloudWarehouseAddCommodity(@RequestBody @Validated GloudWarehouseAddCommodityVo gloudWarehouseAddCommodityVo){
        return agedmallShopService.gloudWarehouseAddCommodity(gloudWarehouseAddCommodityVo);
    }

    /**
     * 云仓管理-获取不在该云仓的商品列表
     */
    @PostMapping("/gloudWarehouse/notInList")
    public Object gloudWarehouseNotInList(@RequestBody @Validated GloudWarehouseNotInListVo gloudWarehouseNotInListVo){
        return agedmallShopService.gloudWarehouseNotInList(gloudWarehouseNotInListVo);
    }


    /**
     *  云仓管理-库存管理-筛选
     */
    @PostMapping("/gloudWarehouse/InventoryManagement")
    public Object gloudWarehouseInventoryManagement(@RequestBody @Validated GloudWarehouseInventoryManagementVo gimv){
        return agedmallShopService.gloudWarehouseInventoryManagement(gimv);
    }

    /**
     *  云仓管理-库存管理-编辑-获取规格
     */
    @GetMapping("/gloudWarehouse/modifyMessage")
    public Object gloudWarehouseModifyMessage(@Validated @NotNull(message = "商品id不能为空") Integer goodsId,
                                              @NotNull(message = "云仓id不能为空") Integer cloudId){
        return agedmallShopService.gloudWarehouseModifyMessage(goodsId,cloudId);
    }

    /**
     *  云仓管理-库存管理-编辑库存
     */
    @PostMapping("/gloudWarehouse/EditWarehouse")
    public Object gloudWarehouseEditWarehouse(@RequestBody @Validated GloudWarehouseEditWarehouseVo gwew){
        return agedmallShopService.gloudWarehouseEditWarehouse(gwew);
    }

    /**
     * 云仓管理-库存管理-删除
     */
    @PostMapping("/gloudWarehouse/delWarehouse")
    public Object gloudWarehouseDelWarehouse(@RequestBody @Validated DelWarehouseGoodsVo delWarehouseGoodsVo){
        return agedmallShopService.gloudWarehouseDelWarehouse(delWarehouseGoodsVo);
    }


    /**
     * 云仓管理-库存管理-批量添加库存
     */
    @PostMapping("/gloudWarehouse/batch")
    public Object gloudWarehouseBatch(@RequestBody @Validated GloudWarehouseBatchVo gwbv){
        return agedmallShopService.gloudWarehouseBatch(gwbv);
    }


    //    -----------标签管理-------------------


    /**
     * 标签管理-添加
     */
    @PostMapping("/productLabel/add")
    public Object productLabelAdd(@RequestBody @Validated ProductLabelAddVo productLabelAddVo){
        return  agedmallShopService.productLabelAdd(productLabelAddVo);
    }


    /**
     * 标签管理-编辑
     */
    @PostMapping("/productLabel/Edit")
    public Object productLabelEdit(@RequestBody @Validated ProductLabelEditVo productLabelEditVo){
        return agedmallShopService.productLabelEdit(productLabelEditVo);
    }


    /**
     *  标签管理-获取列表
     */
    @PostMapping("/productLabel/list")
    public Object productLabelList(@RequestBody @Validated ProductLabelListVo productLabelListVo){
        return agedmallShopService.productLabelList(productLabelListVo);
    }


    /**
     * 标签管理-删除
     */
    @PostMapping("/productLabel/del")
    public Object productLabelDel(@RequestBody @Validated @Size(min = 1,message = "标签id不能为空") List<Long> labelID){
        return agedmallShopService.productLabelDel(labelID);
    }


    //    -----------店铺信息-------------------


    /**
     * 店铺管理-获取店铺信息
     */
    @GetMapping("/shopInformation/info")
    public Object shopInformationInfo(@Validated  @NotNull(message = "店铺id不能为空") Integer shopId){
        return agedmallShopService.shopInformationInfo(shopId);
    }

    /**
     * 店铺管理-店铺信息-编辑
     */
    @PostMapping("/shopInformation/EditStore")
    public Object shopInformationEditStore(@RequestBody ShopInformationEditStoreVo siet){
        return  agedmallShopService.shopInformationEditStore(siet);
    }


    /**
     * 店铺管理-店铺设置
     */
    @PostMapping("/shopInformation/shopSetting")
    public Object shopInformationShopSetting(@RequestBody ShopInformationShopSettingVo siss){
        return agedmallShopService.shopInformationShopSetting(siss);
    }


    //    -----------播报机管理-------------------


    /**
     * 获取门店和云仓列表
     */
    @GetMapping("/getStoreAndCloud")
    public Object getStoreAndCloud(Integer shopId){
        return agedmallShopService.getStoreAndCloud(shopId);
    }


    /**
     * 新增播报机
     */
    @PostMapping("/player/add")
    public Object playerAdd(@RequestBody @Validated PlayerAddVo playerAddVo){
        return agedmallShopService.playerOpt(playerAddVo);
    }


    /**
     * 获取播报机列表
     */
    @PostMapping("/playerManagement/list")
    public Object playerManagementList(@RequestBody @Validated PlayerManagementListVo playerManagementListVo){
        return agedmallShopService.playerManagementList(playerManagementListVo);
    }


    /**
     * 获取播报机版本号列表
     */
    @PostMapping("/playerManagement/editionList/{type}")
    public Object playerManagementEditionList(@PathVariable Integer type){
        return agedmallShopService.playerManagementEditionList(type);
    }

    /**
     * 播报机详情-获取打印列表
     */
    @PostMapping("/player/detail")
    public Object playerDetail(@RequestBody @Validated PlayDetailVo playDetailVo){
        return agedmallShopService.playerDetail(playDetailVo);
    }


    //    -----------财务基本信息-------------------

    /**
     * 添加/编辑财务账号信息
     */
    @PostMapping("/shopInformation/addpay")
    public Object shopInformationAddpay(@RequestBody @Validated ShopInformationAddpayVo shopInformationAddpayVo){
        return agedmallShopService.shopInformationAddpay(shopInformationAddpayVo);
    }

    /**
     *  店铺管理-财务账号-获取列表
     */
    @PostMapping("/shopInformation/accountBink/{shopId}")
    public Object shopInformationAccountBink(@PathVariable @Validated @NotNull(message = "店铺id不能为空") Integer shopId){
        return agedmallShopService.shopInformationAccountBink(shopId);
    }

    /**
     * 店铺管理-财务账号-删除
     */
    @PostMapping("/shopInformation/delFinance/{id}")
    public Object shopInformationDelFinance(@PathVariable @Validated @NotNull(message = "账户id不能为空") Integer id){
        return agedmallShopService.shopInformationDelFinance(id);
    }


    /**
     * 获取门店位置列表
     */
    @PostMapping("/storePositionList")
    public Object storePositionList(@RequestBody StorePositionId storePositionId){
        return agedmallShopService.storePositionList(storePositionId);
    }






    //    -----------医院管理-------------------


    /**
     * 添加医院
     */
    @PostMapping("/addHospitalSend")
    public Object addHospitalSend(@RequestBody @Validated ModifyHospitalVo modifyHospitalVo){
        return agedmallShopService.addHospitalSend(modifyHospitalVo);
    }



    /**
     * 编辑医院
     */
    @PostMapping("/modifyHospitalSend")
    public Object modifyHospitalSend(@RequestBody @Validated ModifyHospitalVo modifyHospitalVo){
        return agedmallShopService.modifyHospitalSend(modifyHospitalVo);
    }


    /**
     * 删除医院
     */
    @PostMapping("/delHospitalSend")
    public Object delHospitalSend(@RequestBody @Validated @Size(min = 1,message = "id不能为空") List<Integer> id){
        return agedmallShopService.delHospitalSend(id);
    }


    /**
     * 医院管理列表
     */
    @PostMapping("/hospitalSendList")
    public Object hospitalSendList(@RequestBody HospitalSendListVo hospitalSendListVo){
        return agedmallShopService.hospitalSendList(hospitalSendListVo);
    }

    /**
     * 根据门店的id列表获取商品列表
     */
    @PostMapping("/hospital/commodityDetail/list")
    public Object commodityDetailList(@RequestBody HospitalCommodityListVo hospitalCommodityListVo){
        return agedmallShopService.commodityDetailList(hospitalCommodityListVo);
    }

    /**
     * 根据主院获取分院列表
     */
    @PostMapping("/getMainAndOtherHospitalName/{id}")
    public Object getMainAndOtherHospitalName(@PathVariable Integer id){
        return agedmallShopService.getMainAndOtherHospitalName(id);
    }

    /**
     * 获取医院库存商品信息列表
     * @return
     */
    @PostMapping("/getHospitalStoreGoodsMessage")
    public Object getHospitalStoreGoodsMessage(@RequestBody List<Integer> storeGoodsIdList){
        return agedmallShopService.getHospitalStoreGoodsMessage(storeGoodsIdList);
    }




    //----------------渠道链接-------------------------


    /**
     * 添加渠道链接
     */
    @PostMapping("/addHospitalChannelLink")
    public Object addHospitalChannelLink(@RequestBody @Validated ModifyHospitalChannelLinkVo modifyHospitalChannelLinkVo){
        return agedmallShopService.addHospitalChannelLink(modifyHospitalChannelLinkVo);
    }

    /**
     * 修改渠道链接
     */
    @PostMapping("/updateHospitalChannelLink")
    public Object updateHospitalChannelLink(@RequestBody @Validated ModifyHospitalChannelLinkVo modifyHospitalChannelLinkVo){
        return agedmallShopService.updateHospitalChannelLink(modifyHospitalChannelLinkVo);
    }

    /**
     * 删除渠道链接
     */
    @PostMapping("/deleteHospitalChannelLink/{id}")
    public Object deleteHospitalChannelLink(@PathVariable @Validated @NotNull(message = "id不能为空")Long id){
        return agedmallShopService.deleteHospitalChannelLinK(id);
    }


    /**
     * 渠道链接列表
     */
    @PostMapping("/hospitalChannelLinkList")
    public Object hospitalChannelLinkList(@RequestBody @Validated HospitalChannelLinkListVo hospitalChannelLinkListVo){
        return agedmallShopService.hospitalChannelLinkList(hospitalChannelLinkListVo);
    }


    // ------------回收点管理-----------------


    /**
     * 新增回收点
     */
    @PostMapping("/addCollectionPoints")
    public Object addCollectionPoints(@RequestBody @Validated ModifyCollectionPointsVo collectionPointsVo){
        return agedmallShopService.addCollectionPoints(collectionPointsVo);
    }

    /**
     *   修改回收点
     */
    @PostMapping("/modifyCollectionPoints")
    public Object modifyCollectionPoints(@RequestBody @Validated ModifyCollectionPointsVo collectionPointsVo){
        return agedmallShopService.modifyCollectionPoints(collectionPointsVo);
    }

    /**
     *   删除回收点
     */
    @PostMapping("/deleteCollectionPoints")
    public Object deleteCollectionPoints(@RequestBody @Validated @Size(min = 1,message = "id不能为空") List<Integer> id){
        return agedmallShopService.deleteCollectionPoints(id);
    }


    /**
     *   获取回收点列表
     */
    @PostMapping("/CollectionPointsList")
    public Object CollectionPointsList(@RequestBody @Validated CollectionPointsListVo collectionPointsListVo){
        return agedmallShopService.CollectionPointsList(collectionPointsListVo);
    }





}
